﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>@ViewData["Title"] - 制章管理系统</title>

    <environment include="Development">
        <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
        <link rel="stylesheet" href="~/css/site.css" />
    </environment>
    <environment exclude="Development">
        <link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css"
              asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
              asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
        <link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
    </environment>
</head>
<body>
    @await Component.InvokeAsync("Navigation");
    @*<nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <ul class="nav navbar-nav">
                    <li class="dropdown ">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">登录系统 <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="/Login/Login">管理员</a></li>
                            <li><a href="/Login/SignMakerLogin">制章人</a></li>

                        </ul>
                    </li>
                </ul>
            </div>
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li class="dropdown ">
                        <a href="#" class="dropdown-toggle " data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">管理员管理 <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="/User/Index">查看管理员</a></li>
                            <li><a href="/User/Create">添加管理员</a></li>

                        </ul>
                    </li>
                    <li class="dropdown ">
                        <a href="#" class="dropdown-toggle " data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">制章人管理 <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="/SignMaker/Index">查看制章人</a></li>
                            <li><a href="/SignMaker/Create">添加制章人</a></li>
                        </ul>
                    </li>
                    <li class="dropdown ">
                        <a href="#" class="dropdown-toggle " data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">印章管理 <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="/ProduceSign/Create">制章</a></li>
                            <li><a href="/ProduceSign/Verify">验章</a></li>
                            <li><a href="/ProduceSign/Restore">恢复印章</a></li>
                        </ul>
                    </li>
                    <li><a href="/InfoLog/Index">日志管理</a></li>
                    <li><a class="LogOut" href="#">退出系统</a></li>
                </ul>
            </div>
        </div>
    </nav>*@


    <partial name="_CookieConsentPartial" />

    <div class="container body-content">
        @RenderBody()
        <hr />
        <footer>
            <p>&copy; 2018 - 制章管理系统</p>
        </footer>
    </div>

    <environment include="Development">
        <script src="~/lib/jquery/dist/jquery.js"></script>
        <script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
        <script src="~/js/site.js" asp-append-version="true"></script>
    </environment>
    <environment exclude="Development">
        <script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.3.1.min.js"
                asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
                asp-fallback-test="window.jQuery"
                crossorigin="anonymous"
                integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT">
        </script>
        <script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"
                asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"
                asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"
                crossorigin="anonymous"
                integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa">
        </script>
        <script src="~/js/site.min.js" asp-append-version="true"></script>
    </environment>
    <script>
        $(function () {
            //退出系统
            $('.LogOut').click(function () {
                if (confirm("是否确认退出系统？")) {
                    $.ajax({
                        url: "/Login/LogOut",
                        type: 'Get',
                        success: function (data) {
                            if (data != null && data.state == '200') {
                                if (data.logintype == '0') {
                                    window.location.href = '/Login/Login';
                                } else {
                                    window.location.href = '/Login/SignMakerLogin';
                                }
                            }
                        }
                    });
                }
            });
        })
    </script>
    @RenderSection("Scripts", required: false)
</body>
</html>
